package com.iad.entity;
import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.ManyToOne;


import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "review")
public class Review implements java.io.Serializable {
  private Long id;
  private String title;
  private String content;
  private String author;
  private Long siteId;
  private String siteName;
  private Boolean approved;

  public Review() {
  }

  public Review(Long id, String title, String author, String content, Long siteId, String siteName, Boolean approved) {
    this.id = id;
    this.title = title;
    this.content = content;
    this.author = author;
    this.siteId = siteId;
    this.siteName = siteName;
    this.approved = approved;
  }

  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Long getId() {
    return this.id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  @Column(name = "title", nullable = false, length = 80)
  public String getTitle() {
    return this.title;
  }

  public void setTitle(String title) {
    this.title = title;
  }
  
  @Column(name = "author", nullable = false, length = 80)
  public String getAuthor() {
    return this.author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }
  
  @Column(name = "content", nullable = true, length = 80)
  public String getContent() {
    return this.content;
  }

  public void setContent(String content) {
    this.content = content;
  }
  
  
  @Column(name = "site_id", unique = false, nullable = false)
  public Long getSiteId() {
    return this.siteId;
  }

  public void setSiteId(Long siteId) {
    this.siteId = siteId;
  }
  
  
  @Column(name = "site_name", nullable = false, length = 80)
  public String getSiteName() {
    return this.siteName;
  }

  public void setSiteName(String siteName) {
    this.siteName = siteName;
  }
  
  @Column(name = "approved", unique = false, nullable = false)
  public Boolean getApproved() {
    return approved;
  }

  public void setApproved(Boolean approved) {
    this.approved = approved;
  }
  
}
